#! /bin/bash

service krb5-kdc start
echo "Execute kinit for user hdfs"
sudo -E -u hdfs bash -c "echo 'h2o' | kinit -p hdfs/localhost"
echo "Execute kinit for user hive"
sudo -E -u hive bash -c "echo 'h2o' | kinit -p hive/localhost"
echo "Execute kinit for user jenkins"
sudo -E -u jenkins bash -c "echo 'h2o' | kinit"
echo "Execute kinit for user root"
sudo -E bash -c "echo 'h2o' | kinit"
